#include <iostream>
#include <ctime>
using namespace std;

const int N = 1e5 + 10; 

int a[N],n,tmp[N];


void Mesort(int le,int ri){
	if(le >= ri) return ;
	
	int mid = (le + ri) >> 1;
	Mesort(le,mid);
	Mesort(mid + 1,ri);
	
	int cur1 = le,cur2 = mid + 1,i = le;
	while(cur1 <= mid&&cur2 <= ri){
		if(a[cur1] < a[cur2]) tmp[i++] = a[cur1++];
		else tmp[i++] = a[cur2++]; 
	}
	while(cur1 <= mid) tmp[i++] = a[cur1++];
	while(cur2 <= ri) tmp[i++] = a[cur2++];
	for(int j = le;j <= ri;j++){
		a[j] = tmp[j];
	}
}

int main(){
	cin >> n;
	for(int i = 1;i <= n;i++){
		cin >> a[i];
	}
	Mesort(1,n);
	for(int i = 1;i <= n;i++){
		cout << a[i] << " ";
	}
}
